package com.sky.controller.user;

import com.sky.entity.Dish;
import com.sky.result.Result;
import com.sky.service.DishService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * ClassName: DishController
 * Package: com.sky.controller.user
 * Description:菜品
 *
 * @Author: Zhang Peiyuan
 * @Create: 2024-12-21-19:55
 * @Version: v1.0
 */
@RestController("userDishController")
@RequestMapping("/user/dish")
public class DishController {
    @Resource
    private DishService dishService;

    @GetMapping("/list")
    public Result<List<Dish>> queryDishList(Long categoryId) {
        return Result.success(dishService.queryDishList(categoryId));
    }

}
